package core;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public final class PopUpBuy {
	
	JDialog dialog;
	
	JOptionPane pPane = new JOptionPane("Buy Field?");
	Object[] options = new String[]{"Yes", "No"};
	
	public PopUpBuy() {
		pPane.setOptions(options);
		dialog = pPane.createDialog(new JFrame(),"Ownable field, no current owner");
	}
	
	public boolean BuyFieldQ(){
		dialog.show();
		Object obj = pPane.getValue();
		String[] answers = {"Yes", "No"};
		if(answers[0].equals(obj))
			return true;
		else
			return false;
		
	}
	

}
